package com.leadzone.dms.ctrl.base;

 
import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

public class BaseController {
 
	    protected final Logger log = LoggerFactory.getLogger(this.getClass());
		public String getFullUrl(HttpServletRequest request){
			return   "http://" + request.getServerName() //服务器地址  
	     
	        + request.getContextPath()      //项目名称  
	        + request.getServletPath();      //请求页面或其他地址  
		}
		public String getUrl(HttpServletRequest request){
			return   "http://" + request.getServerName() //服务器地址  
	     
	        + request.getContextPath();     //项目名称   
		}
		@RequestMapping(value = "error")
		public ModelAndView error(){
			return new ModelAndView("error"); 
		}
}
